<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">

<h:head></h:head>
<body>
	<h:dataTable border="1" value="#{catalog.products}" var="p">
		<h:column id="pid">
			<f:facet name="header">
				<h:outputText value="Id" />
			</f:facet>
			<h:outputText value="#{p.pid}"></h:outputText>
		</h:column>
		<h:column id="name">
			<f:facet name="header">
				<h:outputText value="Product Name" />
			</f:facet>
			<h:form>
				<h:commandLink action="detail">
					<h:outputText value="#{p.name}" />
					<f:setPropertyActionListener target="#{product.pid}"
						value="#{p.pid}" />
				</h:commandLink>
			</h:form>
		</h:column>
		<h:column id="price">
			<f:facet name="header">
				<h:outputText value="Price" />
			</f:facet>
			<h:outputText value="#{p.price}" />
		</h:column>
	</h:dataTable>
</body>
</html>
